package com.gs.dao;

import com.gs.pojo.Commodity;
import java.util.List;

import org.apache.ibatis.annotations.Param;


public interface CommodityDao {

    public int deleteById(Integer id);
	
	
	public int insertAll(Commodity commodityPo);
	
	
	public	Commodity selectById(Integer id);

	
	public int updateById(Commodity commodityPo);
	
	
	//分页模糊查询
    public List<Commodity> pageFuzzyselect(@Param("commodityName") String commodityName,
        @Param("commodityTypeID") int commodityTypeID, @Param("start") int start, @Param("pageSize") int pageSize);
    
    //分页模糊查询总条数
    public int countFuzzyselect(@Param("commodityName") String commodityName, @Param("commodityTypeID") int commodityTypeID);
	
    //ajax 验证是否存在 此商品
    public int selectYZ(String commodityName);
    
    
    
    
    
    
    
  //无分页的模糊查询  非本派所用
   public List<Commodity> fuzzySelect(@Param("commodityName") String commodityName,
       @Param("commodityTypeID") int commodityTypeID);
    
}
